{% extends '__base.tpl' %}
{% block head %}
<title>编程达人 {{data.title}}</title>
<meta name="keywords" content="编程达人博客,{{data.title}}" />
<meta name="description" content="{{data.content|toDescription}}"/>
<!-- build:css -->
<link rel="stylesheet" href="../../../public/css/other/wangEditor.css">
<link rel="stylesheet" href="../../../public/css/other/wangEditor-extend.css">
<link rel="stylesheet" type="text/css" href="../../../public/css/other/shCore.css">
<link rel="stylesheet" type="text/css" href="../../../public/css/other/shThemeRDark.css">
<link rel="stylesheet" type="text/css" href="../../../public/css/page/contentPage.css" />
<link rel="stylesheet" type="text/css" href="../../../public/css/page/popup.css" />
<!-- endbuild -->
{% endblock %}

{% block body %}
<div id='box' class="has-code" data-title="编程达人博客-{{data.title}}" data-id="{{data.id}}" data-comment_type="6"
     data-description="编程达人博客-{{data.title}}" data-uptype="blog">
    <div id='content' data-memberid="{{data.memberId}}">
        {%if data%}
        <div class="contHead clearfix relative" >
           <span class="fleft iblock answer-title" >
               <span class="font24">{{data.title|safe}}</span>
           </span>
            <span class="fright btnStyleBlue middle-right" style="margin: 0">博客</span>
        </div>
        <div class="contBody relative">
            <ul class="darenList">
                <li class="darenList-item clearfix">
                    <div class="head-img-box">
                        <a target="_blank" href="/{{data.memberId}}/userInfo.html">
                            <img class="fleft head-img" src="{{data.header|imgPath}}" />
                        </a>
                    </div>
                    <div class="fleft">
                        <h5 class="font16 clo3">
                            <a target="_blank"  href="/{{data.memberId}}/userInfo.html">
                                {{data.nickName}}
                                {% if data.memberType==='V' %}
                                <img src="../../../public/images/daren1.jpg" class="iconLV1" />
                                {% elif data.memberType==='D' %}
                                <img src="../../../public/images/daren2.jpg" class="iconLV" />
                                {% endif  %}
                                <span class="clo9 ml10">等级 {{data.memberType}}{{(data.memberScore/100)|int }}</span>
                            </a>
                            <span  class="hide" data-memberid="{{data.memberId}}" id="memberNotice">
                                <button class="btnStyleS ml20 hide"
                                        onclick="BASE.COMMON.noticeToMember(this)"
                                        data-memberid="{{data.memberId}}">+ 关注</button>
                                <button class="btnStyleC ml20 hide"
                                        onclick="BASE.COMMON.cancelNotice(this)"
                                        data-memberid="{{data.memberId}}">已关注</button>
                            </span>
                             <span id="memberModify" class="hide">
                                <button  data-content="{{data.content}}"
                                         data-title="{{data.title|safe}}"
                                         data-content_price="{{data.contentPrice}}"
                                         data-content_support_pays="{{data.contentSupportPays}}"
                                         data-attach_price="{{data.attachPrice}}"
                                         data-attach_support_pays="{{data.attachSupportPays}}"
                                         data-covers="{{data.covers}}"
                                         data-file_url="{{data.attachUrl}}"
                                         data-categoryid="{{data.categoryId}}"
                                         data-reply_show_is="{{data.replyShowIs}}"
                                         onclick="BASE.BLOGCONTENT.modifyPopupShow(this)"
                                         class="btnBlueM ml30"> 修改</button>
                            </span>
                        </h5>
                        <div class="clo9 font12">{{data.createDateTime|dateFormat}}</div>
                        <div class="ptb20 clo3 editor-content w-e-text" id="blog_content" > {{data.content|codeContent|safe}}</div>
                    </div>
                </li>
            </ul>
            {%if data.contentPrice >0 %}
            <div id="buyIs" class="hide">
                <span class="center blog-look-all-box">
                     <button class="btn look-all-btn"
                             onclick="BASE.BLOGCONTENT.buyContent(this)">阅读全文需支付
                         {{data.contentSupportPays|supportPays}}{{data.contentPrice}}</button>
                </span>
            </div>
            {%endif%}
        </div>

        {%else%}
        <div class="pd20 center font18">
            你来晚了,数据已经不在了...
        </div>
        {%endif%}
    </div><!-- end content-->
    <div class="lmessage">
        <div class="commentTag" style="overflow: visible">
            <ul class="clearfix">
                <li>浏览 <em>{{data.clickCount}}</em></li>
                <li>点赞 <em>{{data.likeCount}}</em></li>
                <li>收藏 <em>{{data.collectCount}}</em></li>
                <li>分享 <em>{{data.shareCount}}</em></li>
                {%if data.replyShowIs%}
                <li class="red font13">
                    <span id="commentIs">
                        <span>仅回复可见</span>
                        <span class="hide">
                            {%include '__blog_down.html'%}
                        </span>
                    </span>
                </li>
                {%else%}
                <li>
                    {%if data.attachPrice >0 %}
                      <span id="source_buyIs">
                        <span>
                            <button class="btn red-border-btn" onclick="BASE.BLOGCONTENT.buySource(this)">附件购买
                                {{data.attachSupportPays|supportPays}}{{data.attachPrice}}
                            </button>
                        </span>
                        <span class="hide">
                             {%include '__blog_down.html'%}
                        </span>
                      </span>
                    {%else%}
                        {%include '__blog_down.html'%}
                    {%endif%}
                </li>
                {%endif%}
                <li class="social-share ml20"  data-initialized="true">分享：
                    {%include '__share1.html'%}
                </li>
                <li class="pointer mr20" style="float: right">
                    <span id="likeIs">
                        <span onclick="BASE.BLOGCONTENT.zanSource(this);">
                            <img src='../../../public/images/zan.jpg' class="vsub mr5">点赞
                        </span>
                        <span onclick="BASE.BLOGCONTENT.unzanSource(this);" class="orange hide">
                            <img src='../../../public/images/zan_h.png' class="vmiddle mr10">已赞
                        </span>
                    </span>
                     <span id="collectIs" class="ml20">
                        <span data-id="{{data.id}}" onclick="BASE.COMMON.collectBlog(this)">
                             <img src="../../../public/images/collect.jpg" class="vmiddle mr5">收藏
                        </span>
                        <span data-id="{{data.id}}" onclick="BASE.COMMON.uncollectBlog(this)" class="orange hide">
                            <img src='../../../public/images/collect_h.png' class="vmiddle mr10">已收藏
                        </span>
                    </span>
                </li>
                <script id="downPanInfo_tpl" type="text/html">
                    <span class="clo6">
                         网盘链接：<a class="blue mr10 ove pan-link"
                                 href="<%=formatUrl(panInfo.panUrl)%>" target="_blank"><%panInfo.panUrl%></a>
                         提取码：<span class="blue"><%panInfo.panPwd%></span>
                    </span>
                </script>
            </ul>
        </div>

        <div class="lmessageB">
            <span class="lmText">评论
                {% if data.commentCount>0 %}
                ({{data.commentCount}})
                {% endif %}
            </span>
        </div>
        <div class="lmessageC relative" id="comment">
            {% include '__comment_reply_list_textarea.html' %}
            {% include '__comment_reply_list_script.html' %}
            {% include '__page.html' %}
        </div>
    </div>
    <div class="fixed-icon">
        <a href="javascript:;"class="fixed-icon-item"  onclick="BASE.COMMON.scrollTop($('#content').height())">
            <img width="25px" src="../../../public/images/talk.png" alt="talk">
            {%if data.commentCount>0%}
            {{data.commentCount}}
            {%endif%}
        </a>
        <a href="javascript:;" class="fixed-icon-item" onclick="BASE.COMMON.scrollTop(1)">
            <img width="25px"  src="../../../public/images/backhome.png" alt="top">
        </a>
    </div>
</div>
{% endblock %}

{% block footer %}
{{ super() }}
<div id="modify" class="has-code">>
    {% include '__popup_blog.html' %}
</div>
{% endblock %}

{% block script %}
{{ super() }}
<!-- build:js -->
<script src="../../../public/js/page/plugin/wangEditor.js"></script>
<script src="../../../public/js/page/plugin/wangEditor-extentd.js"></script>
<script type="text/javascript" src="../../../public/js/page/SyntaxHighlighter/XRegExp.js"></script>
<script type="text/javascript" src="../../../public/js/page/SyntaxHighlighter/shCore.js"></script>
<script type="text/javascript" src="../../../public/js/page/SyntaxHighlighter/shBrushCSharp.js"></script>
<script type="text/javascript" src="../../../public/js/page/SyntaxHighlighter/shBrushCpp.js"></script>
<script type="text/javascript" src="../../../public/js/page/SyntaxHighlighter/shBrushJava.js"></script>
<script type="text/javascript" src="../../../public/js/page/SyntaxHighlighter/shBrushJScript.js"></script>
<script type="text/javascript" src="../../../public/js/page/SyntaxHighlighter/shBrushPhp.js"></script>
<script type="text/javascript" src="../../../public/js/page/SyntaxHighlighter/shBrushPython.js"></script>
<script type="text/javascript" src="../../../public/js/page/SyntaxHighlighter/shBrushPlain.js"></script>
<script type="text/javascript" src="../../../public/js/page/SyntaxHighlighter/shBrushSql.js"></script>
<script>
    SyntaxHighlighter.all();
</script>
<script src="../../../public/js/page/plugin/nativepage.js"></script>
<script src='../../../public/js/page/common/uploadAnswer.js'></script>
<script src='../../../public/js/page/common/popup.js'></script>
<script src='../../../public/js/page/blog/blog_common.js'></script>
<script src='../../../public/js/page/blog/blog_content.js'></script>
<!-- endbuild -->
{% endblock %}